package com.mhh.selary.backend.dto.project;

import com.mhh.sdk.beans.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author mhh
 * @date 2020-09-14 18:23:54
 */
@Getter
@Setter
@ApiModel("保存分组入参")
public class SubGroupSaveDTO extends BaseDTO {

    @ApiModelProperty(value = "id(新建不传，修改必传)")
    private Long id;

    @ApiModelProperty(value = "项目id")
    @NotNull(message = "项目id不能为空")
    private Long projectId;

    @ApiModelProperty(value = "分组名称")
    @NotEmpty(message = "分组名称不能为空")
    @Length(max = 12, message = "分组名称不能超过12个字符")
    private String groupName;

    @ApiModelProperty(value = "父组id")
    private Long parentId;
}
